package com.aboverock.common.validator;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * Validate that the string not contains these strings in array value.
 *
 * @author Rock Wang
 */
@Documented
@Constraint(validatedBy = { NotContainsValidator.class })
@Target({ FIELD, PARAMETER })
@Retention(RUNTIME)
public @interface NotContains {
    String[] value() default {};

    String message() default "{com.aboverock.validator.constraints.NotContains.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
